Algorithms: Part I (Fahad Batla's Library) by Robert Sedgewick & Kevin Wayne

Algorithms: Part I (Fahad Batla's Library) by Robert Sedgewick & Kevin Wayne

Author:Robert Sedgewick & Kevin Wayne
Language: eng
Format: epub, mobi
Publisher: Addison-Wesley Professional
Published: 2011-10-26T16:00:00+00:00


* * *

Property E. The number of compares used by shellsort with the increments 1, 4, 13, 40, 121, 364, . . . is bounded by a small multiple of N times the number of increments used.

Evidence: Instrumenting ALGORITHM 2.3 to count compares and divide by the number of increments used is a straightforward exercise (see EXERCISE 2.1.12). Extensive experiments suggest that the average number of compares per increment might be N1/5, but it is quite difficult to discern the growth in that function unless N is huge. This property also seems to be rather insensitive to the input model.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.